package demo6;

class Lei{
    String s;
    public Lei(String s) {
        this.s = s;
    }
    public void speak(){
        System.out.println("咿咿呀呀......");
    }
}
class People extends Lei{
    public People(String s) {
        super(s);
    }
    public void speak(){
        System.out.println("小样的，不错嘛！");
    }
    public void think(){
        System.out.println("别说话！认真思考！");
    }
}

public class E {
    public static void main(String[] args) {
        Lei lei=new Lei("欸嘿");
        System.out.println(lei.s);
        lei.speak();
        People people=new People("张三");
        System.out.println(people.s);
        people.speak();
        people.think();
    }
}
